package com.ruoyi.pingjiao.task;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.pingjiao.service.IEvaluationService;
import com.ruoyi.pingjiao.service.IEvalutionActivityService;
import com.ruoyi.pingjiao.service.impl.EvaluationServiceImpl;
import com.ruoyi.pingjiao.service.impl.EvalutionActivityServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @Auther: hhp
 * @Date: 2022/10/30
 * @Description: com.ruoyi.pingjiao.task
 * @version: 1.0
 */
@Component("testTask")
public class TestTask {

    @Autowired
    private EvalutionActivityServiceImpl evalutionActivityService;


    public void testTask(){
        System.out.println("执行测试任务。。。  当前时间：" + new Date() + "=============================");
    }


    public void calScoresOfTeacher(){
        if(evalutionActivityService.calculateEvaluationScoresOfTeacher()){
           System.out.println("定时任务：统计教师成绩完成");
        }else {
            System.out.println("定时任务：统计教师成绩失败");
        }
    }

}
